import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import userRoutes from './user.ts'
import communityRoutes from './community.ts'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: '主页',
        component: () => import('../view/baseContainer.vue'),
        children: [...userRoutes, ...communityRoutes]
    },
    {
        path: '/login',
        name: '登陆',
        component: () => import('../view/login.vue')
    }
]
console.log('++routes++', routes)

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
